package com.manage.competition.repository;

import com.manage.competition.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Create with IDEA
 *
 * @Author:Vantcy
 * @Date: Create in 11:11 2019/1/27
 * @Description:
 */
public interface RoleRepository extends JpaSpecificationExecutor<Role>,JpaRepository<Role,Long> {
    /**
     * 根据userId 查角色信息
     * @param userId
     * @return
     */
    List<Role> findAllByUserId(Long userId);

    Role findByUserId(Long userId);
}
